home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / puttyValues.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.9 KB  |  122 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // Sculpt Paint Tool UI script
  18. //    
  19. global proc puttyValues(string $toolName)
  20. {
  21.     string $parent = (`toolPropertyWindow -q -location` + "|putty");
  22.     setParent $parent;
  23.  
  24.     string $helpTag = "SculptSurfacesTool";
  25.     toolPropertySetCommon $toolName "putty.xpm" $helpTag;
  26.  
  27.     string $currentTab = `tabLayout -query -selectTab puttyTabs_L`;
  28.     jasperValues( "puttyCtx", $toolName, $currentTab );
  29.  
  30.     toolPropertySelect putty;
  31. }
  32.  
  33. global    proc jasperSculptValues(
  34.     string     $jasperCommand,
  35.     string     $toolName,
  36.     string     $currentTool,
  37.     int     $force
  38. )
  39. {
  40.     string $cmd;
  41.     global int $jasperSculptActive;
  42.  
  43.     // print ("jasperSculptValues( " + $force + ") active = " 
  44.     //       + $jasperSculptActive + "\n");
  45.  
  46.     if ( ! $force && $jasperSculptActive ) return;
  47.     $jasperSculptActive = 1;
  48.  
  49.  
  50.     //
  51.     // Stamp Profile frameLayout
  52.     //
  53.     jasperStampProfileValues( $jasperCommand, $toolName,
  54.                   $currentTool, $force
  55.     );
  56.  
  57.  
  58.     //
  59.     //  Sculpt Operation frameLayout
  60.     //
  61.     string $cmd = ($jasperCommand + " -q -mtm " + $toolName);
  62.     string $operation =  `eval $cmd`;
  63.     if ( $operation == "push" ) {
  64.         radioButtonGrp -e -sl 1 mouseTipRadio;
  65.     } else if ( $operation == "pull" ) {
  66.         radioButtonGrp -e -sl 2 mouseTipRadio;
  67.     } else if ( $operation == "smooth" ) {
  68.         radioButtonGrp -e -sl 3 mouseTipRadio;
  69.     } else if ( $operation == "erase" ) {
  70.         radioButtonGrp -e -sl 4 mouseTipRadio;
  71.     }
  72.  
  73.  
  74.     //
  75.     // Auto Smooth frameLayout
  76.     //
  77.     $cmd = ($jasperCommand + " -q -autosmooth " + $toolName);
  78.     checkBoxGrp -e -v1 `eval $cmd` autoSmooth;
  79.  
  80.     $cmd = ($jasperCommand + " -q -smoothiters " + $toolName);
  81.     intSliderGrp -e -v `eval $cmd` smoothStrength;
  82.  
  83.  
  84.     //
  85.     //  Sculpt Variables frameLayout
  86.     //
  87.     $cmd = ($jasperCommand + " -q -refvector " + $toolName);
  88.     string $refvector = `eval $cmd`;
  89.     if ( $refvector == "normal" ) {
  90.         radioButtonGrp -e -sl 1 rv0Radio;
  91.     } else if ( $refvector == "firstnormal" ) {
  92.         radioButtonGrp -e -sl 2 rv0Radio;
  93.     } else if ( $refvector == "view" ) {
  94.         radioButtonGrp -e -sl 3 rv0Radio;
  95.     } else if ( $refvector == "xaxis" ) {
  96.         radioButtonGrp -e -sl 1 rv1Radio;
  97.     } else if ( $refvector == "yaxis" ) {
  98.         radioButtonGrp -e -sl 2 rv1Radio;
  99.     } else if ( $refvector == "zaxis" ) {
  100.         radioButtonGrp -e -sl 3 rv1Radio;
  101.     } else if ( $refvector == "visoparm" ) {
  102.         radioButtonGrp -e -sl 1 rv2Radio;
  103.     } else if ( $refvector == "uisoparm" ) {
  104.         radioButtonGrp -e -sl 2 rv2Radio;
  105.     }
  106.     updateUVSculptDirection( $jasperCommand );
  107.  
  108.     $cmd = ($jasperCommand + " -q -maxdisp " + $toolName);
  109.     floatSliderGrp -e -v `eval $cmd` maxDisp;
  110.     text -e -l `currentUnit -q -l` maxDispUnits;
  111.  
  112.  
  113.     //
  114.     //  Surface frameLayout
  115.     //
  116.     $cmd = ($jasperCommand + " -q -refsurface " + $toolName);
  117.     checkBox -e -v `eval $cmd` refSurfaceChk;
  118.  
  119.     $cmd = ($jasperCommand + " -q -erasesrfupd " + $toolName);
  120.     checkBox -e -v `eval $cmd` eraseSurfaceChk;
  121. }
  122.